package com.tky.conference.utlils;

import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.DialogInterface;

/**
 * Created by yy on 2015/12/3.
 */
public class ShowDialog {
    private Context c;
    private ProgressDialog dialog;
    public ShowDialog(Context context){
        this.c=context;
        dialog=new ProgressDialog(c);
    }
    public  void Loading(String msg){
        dialog.setCanceledOnTouchOutside(false);
        dialog.setOnCancelListener(new DialogInterface.OnCancelListener() {
            @Override
            public void onCancel(DialogInterface dialog) {
            }
        });
        dialog.setMessage(msg);
        dialog.show();
    }

    public void dismissDialog(){
        dialog.dismiss();
    }
}
